export OMPI_MCA_mpi_yield_when_idle=0
cd $PBS_O_WORKDIR

for IDX in 10 9 8 7 6 5 4 3 2 1
do

    export OMP_NUM_THREADS=$IDX

    echo -e -n "********** TESTING OPENMP ON "
    echo -e -n $OMP_NUM_THREADS
    echo -e -n " THREADS ***********\n"
    
    echo -e "******** OUTER LOOP "
    ./benchmark--outer
    echo -e -n "\n"

    echo -e "******** TWO OUTER LOOPS "
    ./benchmark--outer_two
    echo -e -n "\n"

    echo -e "******** THREE LOOPS "
    ./benchmark--all
    echo -e -n "\n"

done

